//package com.example.springbott.exception;
//
//import com.example.springbott.bean.BaseRespVo;
//import com.google.gson.Gson;
//import lombok.SneakyThrows;
//import org.springframework.stereotype.Component;
//import org.springframework.web.servlet.HandlerExceptionResolver;
//import org.springframework.web.servlet.ModelAndView;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
///**
// * @author 1784549954@qq.com
// * @since 2022/11/20 11:38
// */
//@Component
//public class ProjectException implements HandlerExceptionResolver {
//    Gson gson = new Gson();
//    @SneakyThrows
//    @Override
//    public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
//        BaseRespVo baseRespVo = BaseRespVo.invalidParameter("网络繁忙请稍后再试");
//        response.getWriter().println(gson.toJson(baseRespVo));
//        return null;
//    }
//}
